<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>

</head>
<body>
<button id="test">点我</button>

<script type="text/javascript" src="jquery.js"></script>
<!--<script type="text/javascript" src="source/thsApi.js"></script>-->
<script src="test.js"></script>
<script>
  $(function(){
    // (async()=>{
    //   $('#test').click(async function(){
    //     var quote = new ThsQuote();
    //     var time = await quote.getServerTime();
    //     console.log(time);
    //     console.log(1122);
    //   });
      
    // })();
    var str = "$(function(){aaa})";
    var reg = /(async)*\s*function\s*([\w]+)\s*\([\s\S]*?\)\s*\{|([\w]+)\s*:(async)*\s*function\s*\([\s\S]*?\)\s*\{|([\w]+)\s*=(async)*\s*function\s*\([\s\S]*?\)\s*\{|(((define)|(\$))\s*\(|,|\()\s*(async)*\s*function\s*\([\s\S]*?\)\s*\{/g;
    while(reg.exec(str) != null){
      console.log(RegExp.$9);
    }
});
  


</script>
</body>
</html>
